# -*- coding:utf-8 -*-

import pymysql

conn = pymysql.Connect(host="120.77.238.74",user="ibd",password="tiIXSUYjR4tZAOnQ",db="gitlab")
cursor = conn.cursor()
result = cursor.execute("show tables")
# print(cursor.fetchall())
# print(type(cursor.fetchall()))

for table in cursor.fetchall():
    # print(table[0])
    # tablename = table[0]
    # print(tablename)
    select_cmd = "select * from" + " " + "`" + table[0] + "`"
    print(select_cmd)
    cursor.execute(select_cmd)
    print(cursor.fetchall())
    print()
    # if "ibdp2p" in cursor.fetchall():
    #     print(cursor.fetchall())
# print(result)